package com.ydd.mapper;

import com.github.pagehelper.Page;
import com.ydd.entity.SysUser;
import com.ydd.entity.YddArticle;
import com.ydd.entity.YddCate;
import com.ydd.entity.YddUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface HomePageMapper {
    

    @Select("select * from ydd_cate where id=#{cateId}")
    YddCate searchCateName(Integer cateId);


    Page<YddArticle> searchYddArticle(String id);

    @Select("select * from ydd_article where id=#{id}")
    YddArticle searchById(String id);


    void addUser(SysUser sysUser);

    @Select("select * from ydd_article;")
    List<YddArticle> searchYddArticleAll();
}
